<?PHP
session_cache_limiter('private, must-revalidate');
session_start();
?>

<!DOCTYPE html>
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Gestured
Description: A three-column, fixed-width blog design.
Version    : 1.0
Released   : 20091004

-->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo $title; ?></title>
<meta name="keywords" content="" />
<meta name="Gestured" content="" />
<link href="default.css" rel="stylesheet" type="text/css" " media="screen" />
<?php 
if ($optionalcss == '')
	$optionalcss = '<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>';//Javascript bug fix
print $optionalcss; 
?>

<link type="text/css" href="css/vader/jquery-ui-1.8.16.custom.css" rel="stylesheet" />	
<!--<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>-->
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
</head>
<body>
<div id="wrapper">
<!-- start header -->
<div id="header">
	<div id="menu">
		<ul id="main">
			<li class="current_page_item"><a href="index.php">Home</a></li>
			<li><a href="reviews.php">Reviews</a></li>
			<li><?php if(isset($_SESSION['user'])) { echo "<b>Logged in as ". $_SESSION['user'] .".</b>"; } ?></li>
			<li>	
				<div style='position:relative; right: -350px; top:-5px;'>	
				<form name='searchForm' method='post' action='movies.php'>
				<?php 
				print "<script>$(function() {
					var availableTags = [";
				include 'std_dbs.php';
				$q = "SELECT MOVTITLE FROM MOVIES WHERE PENDSTATUS = 0";
				$q = oci_parse($connect, $q);
				oci_execute($q);
				$num = oci_num_rows($q);
				$count = 1;
				while($row = oci_fetch_array($q, OCI_NUM)){
					if ($num == $count)
						print '"'.$row[0].'"';
					else
						print '"'.$row[0].'", ';
					$count++;
				}
				print '];
				$( "#tags" ).autocomplete({
				source: availableTags, autoFocus: true
				});
				});
				</script>';
				?>
				<div class="ui-widget">
				<input id="tags" name='searchMovieString' />
				<input type='submit' value='Search'>
				</div>	
				<!--<b>SEARCH MOVIE:</b> <input type='text' name='searchMovieString'>-->
				
				</form>
				</div>
			</li>
		</ul>			
	</div>
	<div id="logo">
		<h1><span>RedBox Rental Review</span></h1>
		
	</div>
</div>
<!-- end header -->
	<!-- start page -->
	<div id="page">

